package com.yyge.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yyge.callback.PageCallback;
import com.yyge.entity.MerchandiseClass;
import com.yyge.entity.Merchandiser;
import com.yyge.vo.BeanConverter;
import com.yyge.vo.PageVo;

public class BaseController {
    public PageVo page(Integer page, Integer size, PageCallback callback){
      Page<Merchandiser> pageInfo=new Page<>();
      pageInfo.setCurrent(page);
      pageInfo.setSize(size);

      pageInfo=callback.doPage(pageInfo);
      PageVo pageVo= BeanConverter.MAPPER.page2vo(pageInfo);
      return pageVo;
    }
}
